package com.code.mapper;

import com.code.domain.Dish;
import com.code.domain.Type;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
public interface DishMapper {
    Dish search(Integer dishId);
    int addDish(@Param("dishName") String dishName, @Param("price") double price , @Param("dishType") Type dishType,@Param("image") String image);
    int deleteDish(Integer dishId);
    int updateDish(@Param("dish") Dish dish);
    List<Dish> searchAll();
    List<Dish> searchByType(String dishType);
}
